package org.example.utils;

import java.util.HashSet;
import java.util.Set;
import java.util.stream.Collectors;

public class StrUtil {

    public static String toStr(Set<String> set){
        return set.stream().collect(Collectors.joining(","));
    }
    public static Set<String> toSet(String str){
        HashSet<String> set=new HashSet<>();
        for (String s : str.split(",")) {
            set.add(s);
        }
        return set;
    }
}
